package la.iok.hzsvn.lewin.movie.shopmovie.mapper;

import la.iok.hzsvn.lewin.movie.core.shopmovie.param.CouponBaseFilterParam;
import la.iok.hzsvn.lewin.movie.core.shopmovie.param.CouponListParam;
import la.iok.hzsvn.lewin.movie.shopmovie.entity.Coupon;
import la.iok.hzsvn.lewin.mybatis.mapper.BaseMapper;
import la.iok.hzsvn.share.annotations.NotNull;

import java.util.Collection;
import java.util.List;

public interface CouponMapper extends BaseMapper<Coupon> {
    int updateUser(@NotNull Coupon entity);

    List<Coupon> list(String orderColumn, String order, CouponListParam listParam, Collection<Long> orgUnitIds, Long userId);

    List<Coupon> usable(Long userId, CouponBaseFilterParam filterParam);

    List<Coupon> efficacyTiming(String orderColumn, String order,Long orgUnitId,Long dayNum);

    int use(@NotNull Coupon coupon);

    int waitLock(@NotNull Coupon coupon);

    int lock(@NotNull Coupon coupon);

    int unLock(@NotNull Coupon coupon);

    int unWaitLock(Coupon coupon);


}
